<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <button onclick="xhr.abort()">abort</button>
    <script>
      const xhr = new XMLHttpRequest();
      // xhr.open("GET", "http://127.0.0.1:3000/mp4", true);
      xhr.open("GET", "http://127.0.0.1:3000/mp4", false);
      // xhr.onprogress = function (e) {
      //   console.log((e.loaded / e.total) * 100 + "%");
      // };
      // xhr.onabort = function () {
      //   console.log(xhr.status);
      // };
      // 发送请求
      xhr.send();
      console.log("hello log");
    </script>
  </body>
</html>
